package app

//路由
type Router struct {
	path    string      //url路径
	filters []IFilter   //中间件
	handler HandlerFunc //处理函数
}

//注册路由，并添加到App对象的routers
func Route(path string, handler HandlerFunc, filters ...IFilter) {
	WebApp.routers = append(WebApp.routers, &Router{path: path, handler: handler, filters: filters})
}
